#! /usr/bin/env python3
# _*_ coding:utf-8 _*_

'a test module'

__author__ = 'wei.fang'

import sys

def test():
    #获取命令行的参数，封装成list
    args = sys.argv
    if len(args)==1:
        print('hello world!')
    elif len(args) == 2:
        print('Hello,%s' % args[1])
    else:
        print('Too many arguments!')

#作用域
def _private_1(name):
    return 'Hello, %s' % name

def _private_2(name):
    return 'Hi,%s' % name

def greenting(name):
    if len(name) >3:
        return _private_1(name)
    else:
        return _private_2(name)


#类似java中的main方法
if __name__ == '__main__':
    # test()
    str = greenting('aaa')
    print(str)